<?php echo '';exit;?>
<!--{template home/space_header}-->
<style id="diy_style" type="text/css"></style>
<div class="wp">
	<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div>
<div class="klp_conarea">
	<div class="klp_conareaz">
		<!--{subtemplate home/space_my_nav}-->
	</div>
	<div class="klp_conyou cl klp_shoucang">
		<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
		<div class="klp_bgboxradius ">
			<div class="klp_midtitwrap border-bottom disnone">
				<h2 class="klp_midtitle">我的{lang favorite}</h2>
			</div>
			<div class="klp_tabmenuinfo">
				<ul class="klp_sortshowwrap">
					<li>
						<span class="disnone">分类</span>
						<div class="klp_sortcon">							
							<a href="home.php?mod=space&do=favorite&type=all" $actives[all]>{lang favorite_all}</a>
							<a href="home.php?mod=space&do=favorite&type=thread" $actives[thread]>{lang favorite_thread}</a>
							<a href="home.php?mod=space&do=favorite&type=forum" $actives[forum]>{lang favorite_forum}</a>
							<!--{if helper_access::check_module('group')}--><a href="home.php?mod=space&do=favorite&type=group" $actives[group]>{lang favorite_group}</a><!--{/if}-->
							<!--{if helper_access::check_module('blog')}--><a href="home.php?mod=space&do=favorite&type=blog" $actives[blog]>{lang favorite_blog}</a><!--{/if}-->
							<!--{if helper_access::check_module('album')}--><a href="home.php?mod=space&do=favorite&type=album" $actives[album]>{lang favorite_album}</a><!--{/if}-->
							<!--{if helper_access::check_module('portal')}--><a href="home.php?mod=space&do=favorite&type=article" $actives[article]>{lang favorite_article}</a><!--{/if}-->
							<!--{hook/space_favorite_nav_extra}-->
						</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="klp_bgboxradius cl">
			<div class="klp_datumitembox border-bottom">
				<!--{if $list}-->
				<form method="post" autocomplete="off" name="delform" id="delform" action="home.php?mod=spacecp&ac=favorite&op=delete&type=$_GET[type]&checkall=1" onsubmit="showDialog('{lang del_select_favorite_confirm}', 'confirm', '', '$(\'delform\').submit();'); return false;">
				<input type="hidden" name="formhash" value="{FORMHASH}" />
				<input type="hidden" name="delfavorite" value="true" />
				<ul id="favorite_ul" class="">
					<!--{loop $list $k $value}-->
					<li id="fav_$k" class="bbda ptm pbm">
						<a class="y" id="a_delete_$k" href="home.php?mod=spacecp&ac=favorite&op=delete&favid=$k" onclick="showWindow(this.id, this.href, 'get', 0);">{lang delete}</a>
						<input type="checkbox" name="favorite[]" class="pc" value="$k" vid="$value[id]" />
						<!--{if $_GET['type'] == 'all'}--><span>$value[icon]</span><!--{/if}-->
						<a href="$value[url]" target="_blank">$value[title]</a> <span class="xg1 klp_favoritetime"><!--{date($value[dateline], 'u')}--></span>
						<!--{if $value[description]}-->
						<div class="quote">
							<blockquote id="quote_preview">$value[description]</blockquote>
						</div>
						<!--{/if}-->
					</li>
					<!--{/loop}-->
				</ul>
				<p class="mtm pns">
					<label for="chkall" onclick="checkall(this.form, 'favorite')"><input type="checkbox" name="chkall" id="chkall" class="pc vm" />{lang select_all}</label>
					<button type="submit" name="delsubmit" value="true" class="pn vm"><em>{lang del_favorite}</em></button>
					<!--{if $_GET[type] == "thread"}-->
						<button type="button" name="collectionsubmit" value="true" class="pnc vm" onclick="collection_favorite()"><em>{lang collection_favorite}</em></button>
					<!--{/if}-->
				</p>
				</form>
				<!--{if $multi}--><div class="pgs cl mtm">$multi</div><!--{/if}-->
				<!--{else}-->
				<div class="klp_wknull">
					<div class="klp_wknullinner">
						<span class="klp_mullimg"></span>
						<div class="klp_wknulltips">
							<p class="klp_subjecttit">{lang no_favorite_yet}</p>
						</div>
					</div>
				</div>
				<!--{/if}-->
				<!--[diy=diycontentbottom]--><div id="diycontentbottom" class="area"></div><!--[/diy]-->
			</div>
		</div>

	</div>

</div>

<div class="wp mtn">
	<!--[diy=diy3]--><div id="diy3" class="area"></div><!--[/diy]-->
</div>
<script type="text/javascript">
	function favorite_delete(favid) {
		var el = $('fav_' + favid);
		if(el) {
			el.style.display = "none";
		}
	}
	<!--{if $_GET[type] == "thread"}-->
	function collection_favorite() {
		var form = $('delform');
		var prefix = '^favorite';
		var tids = '';
		for(var i = 0; i < form.elements.length; i++) {
			var e = form.elements[i];		
			if(e.name.match(prefix) && e.checked) {
				tids += 'tids[]=' + e.getAttribute('vid') + '&';
			}
		}
		if(tids) {
			showWindow(null, 'forum.php?mod=collection&action=edit&op=addthread&' + tids);
		}
	}
	function update_collection() {}
	<!--{/if}-->
</script>
<!--{template home/space_footer}-->
